package org.kanstantin.nwscan;

import org.kanstantin.nwscan.crawler.network.AddressRange;
import org.kanstantin.nwscan.crawler.network.IPBasedHostFinder;

/**
 * Created by IntelliJ IDEA.
 * User: const
 * Date: 7/11/11
 * Time: 11:53 PM
 * To change this template use File | Settings | File Templates.
 */
public class App2 {
    public static void main(String[] argv) {
        if (argv.length < 1) {
            throw new RuntimeException("Insufficient arguments");
        }

        AddressRange ar = new AddressRange(argv[0]);
        IPBasedHostFinder Finder = new IPBasedHostFinder(ar);


        Finder.scan();
        for (String host: Finder.getHostList()) {
            System.out.printf("%s ", host);
        }
        System.out.println();
    }
}
